import pygame

# 创建一个渐变色 Surface
gradient = pygame.Surface((200, 200))
for y in range(200):
    alpha = int(255 * (y / 200))
    pygame.draw.line(gradient, (255, 0, 0, alpha), (0, y), (200, y))